/*
package com.tongtech.space.common.configs;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

import javax.sql.DataSource;

*/
/**
 * sh_ybsl_dev 一表受理数据源配置
 *
 * @author jinjiayu
 * @since 2020/12/21
 *//*

@Configuration
@MapperScan(basePackages = {"com.tongtech.space.mapper.oneform"}, sqlSessionFactoryRef = "oneformSqlSessionFactory")
public class DataSourceOneFormConfig {
    @Autowired
    private PaginationInterceptor paginationInterceptor;

    @Bean(name = "oneformDataSource")
    @ConfigurationProperties("spring.datasource.one-form")
    public DataSource oneformDataSource(){
        return DataSourceBuilder.create().build();
    }
 
    @Bean(name = "oneformSqlSessionFactory")
    public SqlSessionFactory sqlSessionFactory(@Qualifier("oneformDataSource") DataSource dataSource) throws Exception {
        MybatisSqlSessionFactoryBean sessionFactoryBean = new MybatisSqlSessionFactoryBean();
        sessionFactoryBean.setDataSource(dataSource);
        sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver()
                .getResources("classpath*:/mapper/oneform/*.xml"));
        sessionFactoryBean.setPlugins(paginationInterceptor);
        return sessionFactoryBean.getObject();
    }

    @Bean("oneformSqlSessionTemplate")
    public SqlSessionTemplate matterSqlSessionTemplate(
            @Qualifier("oneformSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
        return new SqlSessionTemplate(sqlSessionFactory);
    }

}
*/
